package io.kiki.sba.registry.common.model.multi.cluster;

import com.google.common.base.Objects;
import lombok.Getter;

import java.io.Serializable;
import java.util.Set;


@Getter
public class DataCenter implements Serializable {
    private static final long serialVersionUID = 1L;

    private final String dataCenter;

    private final Set<String> zoneSet;

    public DataCenter(String dataCenter, Set<String> zoneSet) {
        this.dataCenter = dataCenter;
        this.zoneSet = zoneSet;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DataCenter that = (DataCenter) o;
        return Objects.equal(dataCenter, that.dataCenter) && Objects.equal(zoneSet, that.zoneSet);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(dataCenter, zoneSet);
    }


}
